home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q1082.dms / q1082.adf / src.lzh / Fig / font.h < prev    next >
C/C++ Source or Header  |  1991-07-18  |  973b  |  39 lines

  1. /* 
  2.  *    FIG : Facility for Interactive Generation of figures
  3.  *
  4.  *    Copyright (c) 1988 by Supoj Sutanthavibul (supoj@sally.UTEXAS.EDU)
  5.  *    January 1988.
  6.  *
  7.  *    %W%    %G%
  8. */
  9.  
  10. extern PIX_FONT        canvas_font;
  11. extern PIX_FONT        bold_font;
  12. extern PIX_FONT        roman_font;
  13.  
  14. #ifdef AMIGA
  15. #define        char_height(font) ((font)->tf_YSize)
  16. #define        char_width(font) ((font)->tf_XSize)
  17. #define        char_advance(font,char) ((font)->tf_XSize)
  18. #else
  19. #ifndef    X11
  20.  
  21. #define            char_height(font)    ((font)->pf_defaultsize.y)
  22. #define            char_width(font)    ((font)->pf_defaultsize.x)
  23. #define            char_advance(font,char)    ((font)->pf_char[(char)].pc_adv.x)
  24.  
  25. #else
  26.  
  27. #define        NORMAL_FONT    "fixed"
  28. #define        BOLD_FONT    "8x13bold"
  29.  
  30. #define            char_height(font)    ((font)->max_bounds.ascent + (font)->max_bounds.descent)
  31. #define            char_width(font)    ((font)->max_bounds.width)
  32. #define            char_advance(font,char)    (\
  33.             ((font)->per_char)?\
  34.                 ((font)->per_char[(char)].width):\
  35.                 ((font)->max_bounds.width))
  36.  
  37. #endif    X11
  38. #endif AMIGA
  39.